#ifndef X34_H
#define X34_H

#include "common.h"

// Keepout/keepin/etc.region
template <AllegroVersion version>
struct x34
{
    uint16_t t;
    uint8_t subtype;
    uint8_t layer;

    uint32_t k;
    uint32_t un1;

    uint32_t ptr1; // x28
#if __cplusplus >= 202002L
    COND_FIELD(version >= A_172, uint32_t, un2);
#endif
    uint32_t bitmask1;
    uint32_t ptr2; // x01
    uint32_t ptr3; // x03

    uint32_t un;

    uint32_t TAIL;
    operator x34<A_174>() const;
    static constexpr AllegroVersion versions[1] = {A_172};
};

#if __cplusplus < 202002L
template <> struct x34<A_172>
{
    uint16_t t;
    uint8_t subtype;
    uint8_t layer;

    uint32_t k;
    uint32_t un1;

    uint32_t ptr1; // x28
    uint32_t un2;
    uint32_t bitmask1;
    uint32_t ptr2; // x01
    uint32_t ptr3; // x03

    uint32_t un;

    uint32_t TAIL;
    operator x34<A_174>() const;
    static constexpr AllegroVersion versions[1] = {A_172};
};
template <> struct x34<A_174> : x34<A_172> {};
#endif

#endif // X34_H
